﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TienX.License;

namespace RequestLicense
{
    class Program
    {
        static void Main(string[] args)
        {
            var argsLen = args.Length;
            if (argsLen > 0)
            {
                var userPhoneOrEmail = args[0];
                var lm = new LicenseManager();
                var activeCode = lm.requestUserInfo(userPhoneOrEmail);
                Console.WriteLine("Phone or Email: " + userPhoneOrEmail);
                Console.WriteLine("Your active code:");
                Console.WriteLine(activeCode);
                Console.WriteLine("Press any key to continue!");
                Console.ReadLine();
            }
            else
            {
                Console.WriteLine("Please use with param: RequestLicense.exe [userPhoneOrEmail]");
                Console.ReadLine();
            }
        }
    }
}
